<template>
  <div class="form-config-wrap">
    <el-card class="box-card">

          <div slot="header" class="clearfix  logo">
            <span >{{itemName}}</span>
          </div>

          <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
            <el-tab-pane label="属性配置" name="first">
              <from-field ref="formfield"/>
            </el-tab-pane>
            <el-tab-pane label="表单配置" name="second" style="overflow:auto;">
              <form-design ref="formDesign"/>
            </el-tab-pane>
          </el-tabs>

      </el-card>
  </div>

</template>

<script>
import fromField from "./formfield"
import formDesign from "@/views/form/config/model/formdesign/index"
export default {
  components: {
    fromField,
    formDesign
  },
  data() {
    return {
      activeName: 'first',
      itemName:localStorage.getItem("ls_model_name"),
      cfRefTableId: localStorage.getItem("ls_model_id")
    };
  },
  methods: {
    handleClick(tab, event) {
      if (tab.name == 'first') {
        this.$refs.formfield.getList();
      } else if (tab.name == 'second') {
        this.$refs.formDesign.getList();
      }
    },
  }
};
</script>

<style lang="scss" scoped>
::v-deep ::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.form-config-wrap{
  padding: 12px 20px;
}
</style>
<style lang="scss" scoped>
::v-deep .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
  background-color: #409EFF;
  color: #FFFFFF;
}
::v-deep  .el-tabs__header {
  padding: 0;
  position: relative;
  margin: 0 0 15px !important;
}
::v-deep  .el-tabs__item {
  cursor: pointer;
  padding: 0 14px;
  height: 26px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  line-height: 26px;
  display: inline-block;
  list-style: none;
  font-size: 12px;
  /*font-weight: 500;*/
  color: #303133;
  position: relative;
}
.container {
  background-color: #ffffff;
}
div#pane-third {
  position: relative;
  height: 76vh;
}
.el-card.box-card.is-always-shadow {
/*  width: 96%;
  left: 2%;*/
  position: relative;
}
/*#pane-first{
  margin-top:15px ;
}*/
div#pane-second {
  background-color: #ffffff;
}
::-webkit-scrollbar-track {
  /* background-color: #f1f1f1; */
}
</style>
